package com.gr.labbackend.service.Impl.manage.material;

import com.alibaba.fastjson.JSONObject;
import com.gr.labbackend.mapper.MaterialMapper;
import com.gr.labbackend.service.manage.material.DeleteMaterialService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DeleteMaterialServiceImpl implements DeleteMaterialService {

    @Autowired
    private MaterialMapper materialMapper;

    @Override
    public JSONObject deleteMaterial(int id) {

        JSONObject resp = new JSONObject();
        materialMapper.deleteById(id);
        resp.put("error_message", "success");

        return resp;
    }
}
